<template>
	<view class="loginpage">
		<view class="header">
			<view class="text-left padding text-xl text-black to-back" @click="toBack">
				<text class="cuIcon-close text-bold"></text>
			</view>
			<view class="webname margin-top">
				西安善佑阿姨端登录<text class="text-blue"></text>
			</view>
		</view>

		<SmsLogin />

<!--    <view class="footer">-->
<!--      <view class="check" style="display: flex;align-items: center">-->
<!--        <div style="display: flex;align-items: center" @click="setAgree()">-->
<!--          <text :class="agree?'cuIcon-roundcheckfill themeColor':'cuIcon-roundcheck'"></text>-->
<!--          <text>我已阅读并同意</text>-->
<!--        </div>-->
<!--        <text style="color: #cbbb4"  @click="setAgree2()">《用户协议》</text>-->
<!--      </view>-->
<!--    </view>-->
  </view>
</template>

<script>
	import SmsLogin from './modules/sms_login.vue'; // 验证码登录
	import Footer from './modules/footer.vue'; // 用户协议
	export default {
		components: {SmsLogin,Footer},
		data() {
			return {
        agree:false,
        policy: {}
			}
		},
    onLoad() {
      uni.showLoading()
      this.$http.policyList().then(res => {
        this.policy = res[0]
      })
    },
		methods: {
			toBack(){
				uni.navigateBack()
			},
      setAgree(){
        this.agree =! this.agree;
      },
      setAgree2() {
        uni.navigateTo({
          url: '/pages/policy/policy?id=' + this.policy.id
        })
      }
		}
	}
</script>

<style lang="scss">
page {
  height: 100%;
  overflow: hidden;
  background-color: #ffffff;
}
.loginpage {
  height: 100%;
  overflow: hidden;
  background-color: #ffffff;
  position: relative
}
.footer {
  position: absolute;
  bottom: 60rpx;
  width: 100%;
  font-size: 26rpx;
  color: #999;
  display: flex;
  justify-content: center;
}

.header {
	background-size: cover;
	position: relative;
	text-align: center;
	margin-top: -150upx;
	image {
		height: 160rpx;
		width: 160rpx;
		margin-top: 170rpx;
		border-radius: 30rpx;
	}
	.to-back{
		padding-top: 170rpx;
	}
}
.webname{
	font-size: 35upx;
}
</style>
